<?php
// +----------------------------------------------------------------------
// | 文件说明：用户表关联model 
// +----------------------------------------------------------------------
// | Copyright (c) 2017 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: wuwu <15093565100@163.com>
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Date: 2017-7-26
// +----------------------------------------------------------------------
namespace api\user\model;

use think\Model;


class TagModel extends Model
{
     // 关闭自动写入update_time字段
    protected $updateTime = false;

    //获取单条信息
    public function getInfo($param){
        return $this->where($param)->find();
    }

    //获取列表
     public function getList($param)
    {
    	
        return $this->where($param)->order('createTime desc')->select();
    }

    //新增
    public function create_data($data){
        
    	return $this->insertGetId($data);
    }

    //修改
    public function update_data($data){
    	return $this->allowField(true)->save($data,['id'=>$data['id']]);
    }


}
